<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout/admin">
<head>
    <title>编辑活动</title>
</head>
<body>
<main layout:fragment="content">
    <article class="container" style="padding: 3% 0 2%;">
        <header class="row">
            <blockquote class="flow-text left" th:text="${header}">Header</blockquote>
            </header>
        <section class="row">
            <div class="col s12">
                <table class="striped bordered centered">
                    <thead>
                    <tr>
                        <th>集卡活动标题</th>
                        <th>编辑活动</th>
                    </tr>
                    </thead>

                    <form  th:action="@{'/admin/parser/search'}" method="post">
                        <div class="row">
                            <div class="col s12 center">
                                <input type="text" name="title" placeholder="请输入活动标题"/>
                                <button class="btn waves-effect waves-light btn-large"
                                        type="submit" name="on">搜索</button>
                            </div>
                        </div>
                    </form>
                    <tbody>
                    <th:block th:each="topic : ${topics}" th:if="${topic != null}">
                        <tr>
                            <td th:text="${topic.getTitle()}">Topic's title</td>
                            <td>
                                <a th:href="@{'/edit/' +  ${topic.getId()}}" class="btn btn-floating pulse">
                                    <i class="material-icons">arrow_forward</i>
                                </a>
                            </td>
                        </tr>
                    </th:block>
                    </tbody>
                </table>
                <div class="row">
                    <div class="col s12 center">
                        <a th:href="@{'/addCardActivity'}">添加</a>
                    </div>
                </div>
            </div>
        </section>
    </article>
</main>
</body>
</html>